package com.qulai.amazon_us.service.amazon_us.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import com.alibaba.fastjson2.JSONObject;
import com.qulai.amazon_us.domain.amazon_us.RecordUpload;
import com.qulai.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qulai.amazon_us.mapper.amazon_us.AmazonUsUploadMapper;
import com.qulai.amazon_us.domain.amazon_us.AmazonUsUpload;
import com.qulai.amazon_us.service.amazon_us.IAmazonUsUploadService;

/**
 * 上传记录Service业务层处理
 * 
 * @author hunan
 * @date 2025-01-05
 */
@Service
public class AmazonUsUploadServiceImpl implements IAmazonUsUploadService 
{
    @Autowired
    private AmazonUsUploadMapper amazonUsUploadMapper;

    /**
     * 查询上传记录
     * 
     * @param id 上传记录主键
     * @return 上传记录
     */
    @Override
    public AmazonUsUpload selectAmazonUsUploadById(Long id)
    {
        return amazonUsUploadMapper.selectAmazonUsUploadById(id);
    }

    /**
     * 查询上传记录列表
     * 
     * @param amazonUsUpload 上传记录
     * @return 上传记录
     */
    @Override
    public List<AmazonUsUpload> selectAmazonUsUploadList(AmazonUsUpload amazonUsUpload)
    {
        return amazonUsUploadMapper.selectAmazonUsUploadList(amazonUsUpload);
    }

    /**
     * 新增上传记录
     * 
     * @param amazonUsUpload 上传记录
     * @return 结果
     */
    @Override
    public int insertAmazonUsUpload(AmazonUsUpload amazonUsUpload)
    {
        amazonUsUpload.setCreateTime(DateUtils.getNowDate());
        return amazonUsUploadMapper.insertAmazonUsUpload(amazonUsUpload);
    }

    /**
     * 修改上传记录
     * 
     * @param amazonUsUpload 上传记录
     * @return 结果
     */
    @Override
    public int updateAmazonUsUpload(AmazonUsUpload amazonUsUpload)
    {
        amazonUsUpload.setUpdateTime(DateUtils.getNowDate());
        return amazonUsUploadMapper.updateAmazonUsUpload(amazonUsUpload);
    }

    /**
     * 批量删除上传记录
     * 
     * @param ids 需要删除的上传记录主键
     * @return 结果
     */
    @Override
    public int deleteAmazonUsUploadByIds(Long[] ids)
    {
        return amazonUsUploadMapper.deleteAmazonUsUploadByIds(ids);
    }

    /**
     * 删除上传记录信息
     * 
     * @param id 上传记录主键
     * @return 结果
     */
    @Override
    public int deleteAmazonUsUploadById(Long id)
    {
        return amazonUsUploadMapper.deleteAmazonUsUploadById(id);
    }
}
